package SetKnowledge;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class FirstRepeatCharacterSecond {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		Set s = new HashSet();
		for (int i = 0; i < str.length(); i++) {
			if (!s.add(str.charAt(i))) {
				System.out.println(str.charAt(i));
				return;
			}
		}
	}
}
